package com.example.anpapi.entity.po.novelmodel.Volume;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@TableName("volumes")
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Volume implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 卷ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 作品ID
     */
    @TableField("novel_id")
    private Long novelId;

    /**
     * 卷标题
     */
    @TableField("title")
    private String title;

    /**
     * 卷描述
     */
    @TableField("description")
    private String description;

    /**
     * 排序
     */
    @TableField("sort_order")
    private Integer sortOrder;

    /**
     * 字数
     */
    @TableField("word_count")
    private Integer wordCount;

    /**
     * 章节数
     */
    @TableField("chapter_count")
    private Integer chapterCount;

    /**
     * 创建时间
     */
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

}

